package com.example.mapper;

import com.example.entity.Posts;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface PostsMapper {

    int insert(Posts posts);

    void updateById(Posts posts);

    void deleteById(Integer id);

    @Select("select * from `posts` where id = #{id}")
    Posts selectById(Integer id);

    List<Posts> selectAll(Posts posts);

}
